package cn.opopopo.design_pattern_learn.行为型.command;

// 空调
public class AirConditioner {
    private int temperature = 25;

    public void on() {
        System.out.println("🌡️ 空调启动，温度设为 25℃");
    }

    public void off() {
        System.out.println("🌡️ 空调关闭");
    }

    public void setTemperature(int temp) {
        System.out.println("🌡️ 空调温度调整为 " + temp + "℃");
        this.temperature = temp;
    }

    public int getTemperature() {
        return temperature;
    }
}